package com.teziyou.commodity.service;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Service;

import com.teziyou.commodity.util.Lists;
import com.teziyou.commodity.util.Maps;

@SuppressWarnings("rawtypes")
@Service
public class LineService {
	
	public List findLinesByPage(Map<String, String> paramMap) {
		Map line1 = Maps.newHashMap("travel_product_id", "1", "DictionaryId", "1", "name", "北京动物园一日游", "description", "北京动物园一日游"
				, "route_line_info", "路线信息1", "transportation_info", "交通信息1", "fee_info", "费用说明1", "inventory", "200", "buyin_price", "200"
				, "list_price", "300", "from_time", "2014-09-02 14:14:24", "end_time", "2014-09-02 14:14:27", "isOK", "1");
		Map line2 = Maps.newHashMap("travel_product_id", "2", "DictionaryId", "1", "name", "长白山一日游", "description", "长白山一日游"
				, "route_line_info", "路线信息2", "transportation_info", "交通信息2", "fee_info", "费用说明2", "inventory", "300", "buyin_price", "150"
				, "list_price", "250", "from_time", "2014-09-02 14:14:24", "end_time", "2014-09-02 14:14:27", "isOK", "1");
		Map line3 = Maps.newHashMap("travel_product_id", "3", "DictionaryId", "1", "name", "鼓浪屿一日游", "description", "鼓浪屿一日游"
				, "route_line_info", "路线信息3", "transportation_info", "交通信息3", "fee_info", "费用说明3", "inventory", "100", "buyin_price", "50"
				, "list_price", "60", "from_time", "2014-09-02 14:14:24", "end_time", "2014-09-02 14:14:27", "isOK", "1");
		Map line4 = Maps.newHashMap("travel_product_id", "4", "DictionaryId", "1", "name", "九寨沟一日游", "description", "九寨沟一日游"
				, "route_line_info", "路线信息4", "transportation_info", "交通信息4", "fee_info", "费用说明4", "inventory", "500", "buyin_price", "300"
				, "list_price", "400", "from_time", "2014-09-02 14:14:24", "end_time", "2014-09-02 14:14:27", "isOK", "1");
		return Lists.newArrayList(line1, line2, line3, line4);
	}
	
	public Map findLineById(long id) {
		Map line = Maps.newHashMap("travel_product_id", "1", "DictionaryId", "1", "name", "北京动物园一日游", "description", "北京动物园一日游"
				, "route_line_info", "路线信息1", "transportation_info", "交通信息1", "fee_info", "费用说明1", "inventory", "400", "buyin_price", "200"
				, "list_price", "300", "from_time", "2014-09-02 14:14:24", "end_time", "2014-09-02 14:14:27", "isOK", "1");
		return line;
	}
	
	public List findRelationByLineId(long id) {
		Map scene1 = Maps.newHashMap("travel_product_id", "1", "scenic_id", "2");
		Map scene2 = Maps.newHashMap("travel_product_id", "1", "scenic_id", "2");
		return Lists.newArrayList(scene1, scene2);
	}
	
}
